package com.xingkeduo.gateway.authority.domain;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;

import com.xingkeduo.gateway.authority.pojo.Token;
import com.xingkeduo.gateway.authority.service.AuthService;

/**
 * 一线员工鉴权
 * 
 * @author GJ
 * @time 2019年1月14日 下午4:46:48
 * @description
 */
@Component
public class CraftsmanDomain {
	@Autowired
	private AuthService authService;

	/**
	 * 创建授权
	 *
	 * @param credential
	 * @return
	 * @throws Throwable
	 */
	public void newAuthority(Token token) throws Throwable {
		authService.createToken(token);
	}
}
